/*
	JetTVG2XParser.h


*/


#include "JetCommon.h"


/*
	data_unit_id definition
*/

typedef enum
{
	vbiuid_teletext_non_subtitle = 0x02,
	vbiuid_teletext_subtitle = 0x03,

	vbiuid_inverted_teletext = 0xc0,
	vbiuid_vps = 0xc3,
	vbiuid_wss = 0xc4,
	vbiuid_closed_captioning = 0xc5,
	vbiuid_monochrome_422 = 0xc6,

	vbiuid_amol_48 = 0xd0,
	vbiuid_amol_96 = 0xd1,
	vbiuid_protected_1 = 0xd3,
	vbiuid_protected_2 = 0xd4,
	vbiuid_nabts = 0xd5,
	vbiuid_tvg2x = 0xd6,
	vbiuid_copy_protection = 0xd7,
	vbiuid_protected_3 = 0xd8,
	vbiuid_vitc = 0xd9,
	vbiuid_stuffing = 0xff,

} vbi_data_unit_id_k;

#define vbiuid2string(k) ( \
	(k)==vbiuid_teletext_non_subtitle ? "teletext_non_subtitle" : \
	(k)==vbiuid_teletext_subtitle ? "teletext_subtitle" : \
	(k)==vbiuid_inverted_teletext ? "inverted_teletext" : \
	(k)==vbiuid_vps ? "vps" : \
	(k)==vbiuid_wss ? "wss" : \
	(k)==vbiuid_closed_captioning ? "closed_captioning" : \
	(k)==vbiuid_monochrome_422 ? "monochrome_422" : \
	(k)==vbiuid_amol_48 ? "amol_48" : \
	(k)==vbiuid_amol_96 ? "amol_96" : \
	(k)==vbiuid_protected_1 ? "protected_1" : \
	(k)==vbiuid_protected_2 ? "protected_2" : \
	(k)==vbiuid_nabts ? "nabts" : \
	(k)==vbiuid_tvg2x ? "tvg2x" : \
	(k)==vbiuid_copy_protection ? "copy_protection" : \
	(k)==vbiuid_protected_3 ? "protected_3" : \
	(k)==vbiuid_vitc ? "vitc" : \
	(k)==vbiuid_stuffing ? "stuffing" : \
	"?")



int ParseVBIDataDescriptor(UINT8 *desc_array, INT len, INT *idBuf, INT nBufSize);

void ProcessTVG2XPayload(UINT8 *buf, INT len);



